package exam.aopLogger.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import exam.domian.base.BaseBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Xiongx
 * @version 1.0
 * @date 2021/4/11 14:27
 * @since JDK 1.8
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("log_record")
@ApiModel("日志记录")
@Builder
public class LogRecord extends BaseBean implements Serializable {

    @ApiModelProperty("日志id")
    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    private String id;

    @TableField("server_name")
    @ApiModelProperty("服务名称")
    private String serverName;

    @TableField("ip_addr")
    @ApiModelProperty("ip地址")
    private String ipAddr;

    @TableField("exec_time")
    @ApiModelProperty("执行时间")
    private Integer execTime;


    @TableField("exece_status")
    @ApiModelProperty("执行状态，0正常，1异常")
    private Integer execStatus;

    @TableField("rest_addr")
    @ApiModelProperty("执行路径")
    private String restAddr;

    @TableField("rest_method")
    @ApiModelProperty("执行的方法")
    private String restMethod;

    @Override
    public Date getCreateTime() {
        return super.getCreateTime();
    }
}
